import { RouteRecordName } from "vue-router";

enum LoginFormComponents {
  AccountLoginForm,
  PhoneLoginForm,
  QRCodeLoginForm,
  RegisterForm,
}
enum Gender {
  MALE,
  FEMALE,
}

enum Role {
  NORMAL,
  SUPER_ACCOUNT,
  ROOT,
}
class ImageWithPreview {
  constructor(
    readonly url: String,
    readonly previewUrl: String
  ) {}
}
class Account {
  constructor(
    readonly id: number,
    readonly staffId: number,
    readonly username: string,
    readonly email: string,
    readonly role: string[],
    readonly state: string,
    readonly createTime: string,
  ) {}
}

class Department {
  constructor(
    readonly id: number,
    readonly name: string,
    readonly state: string,
    readonly note: string,
    readonly createTime: string,
  ) {}
}

class Staff {
  constructor(
    readonly id: number,
    readonly name: string,
    readonly gender: Gender,
    readonly avater: string,
    readonly email: string,
    readonly phone: string,
    readonly birthday: string | undefined | null,
    readonly address: string | undefined | null,
    readonly state: string,
    readonly note: string | undefined | null,
    readonly createTime: string,
    readonly account: Account,
    readonly department: Department,
  ) {}
}

interface MenuItem {
  title: string;
  key: string;
  icon?: string;
  children?: MenuItem[];
}

interface Route {
  name: RouteRecordName | null | undefined;
  path: string;
  children?: Route[];
  [propName: string]: any;
}



export { LoginFormComponents, Role, Gender, Account, Staff, Department, MenuItem, Route, ImageWithPreview };
